export const currencType = (current) => {
  let currencySymbol = ''
  if (current === 'USD') {
    currencySymbol = '$';
  }
  else if (current === 'RMB') {
    currencySymbol = '￥';
  }
  else if (current === 'EUR') {
    currencySymbol = '€';
  }
  else if (current === 'GBP') {
    currencySymbol = '￡';
  }
  else if (current === 'CAD') {
    currencySymbol = 'C$';
  }
  else if (current === 'AUD') {
    currencySymbol = 'A$';
  }
  else if (current === 'HKD') {
    currencySymbol = 'HK$';
  }
  return currencySymbol
}

export const ftime = (time) => {
  let date = new Date(time);
  let Y = date.getFullYear();
  let M = date.getMonth() + 1;
  let D = date.getDate();
  let h = date.getHours();
  let m = date.getMinutes();
  let s = date.getSeconds();
  M = M < 10 ? "0" + M : M;
  D = D < 10 ? "0" + D : D;
  h = h < 10 ? "0" + h : h;
  m = m < 10 ? "0" + m : m;
  s = s < 10 ? "0" + s : s;
  return `${Y}-${M}-${D}  ${h}:${m}:${s}`;
}
export const fstate = (state) => {
  let stateIonfo = ''
  if (state === 1) {
    stateIonfo = '待采购'
  } else if (state === 2) {
    stateIonfo = '采购中'
  } else {
    stateIonfo = '采购完成'
  }
  return stateIonfo
}